/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.repair.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import liquibase.pro.packaged.V;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.modules.repair.vo.elevator.ElevatorFloorVo;
import org.springblade.modules.repair.vo.part.PartWordUrlVo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 电梯信息实体类
 *
 * @author BladeX
 * @since 2021-05-21
 */
@Data
@TableName(value = "blade_elevator",autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Elevator对象", description = "电梯信息")
public class Elevator extends TenantEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 设备id(对接梯联网设备）
	 */
	@ApiModelProperty(value = "设备id(对接梯联网设备）")
	private String deviceId;
	/**
	 * 栋
	 */
	@ApiModelProperty(value = "栋")
	private String block;
	/**
	 * 单元
	 */
	@ApiModelProperty(value = "单元")
	private String unit;
	/**
	 * 梯号
	 */
	@ApiModelProperty(value = "梯号")
	private Integer num;
	/**
	 * 层数
	 */
	@ApiModelProperty(value = "层数")
	private String floor;

	/**
	 * 品牌id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long brandId;

	/**
	 * 品牌名称
	 */
	@ApiModelProperty(value = "品牌名称")
	private String brandName;
	/**
	 * 系列名称
	 */
	@ApiModelProperty(value = "系列名称")
	private String seriesName;
	/**
	 * 型号名称
	 */
	@ApiModelProperty(value = "型号名称")
	private String typeName;
	/**
	 * 电梯年限
	 */
	@ApiModelProperty(value = "电梯年限")
	private Integer elevatorYear;
	/**
	 * 电梯年审时间
	 */
	@ApiModelProperty(value = "电梯年审时间")
	private String elevatorAudit;
	/**
	 * 楼盘id
	 */
	@ApiModelProperty(value = "楼盘id")
	private Long buildingId;
	/**
	 * 电梯内部编码
	 */

	@TableField(value = "private_num")
	@ApiModelProperty(value = "电梯内部编码")
	private String privateNum;
	/**
	 * 停梯状态： 1-正常 2-停梯
	 */
	@ApiModelProperty(value = "停梯状态： 1-正常 2-停梯")
	private Integer isStop;

	@ApiModelProperty(value = "任务ID")
	@TableField(exist = false)
	private Long planId;


	/**
	 * 品牌型号id
	 */
	@TableField(value = "brand_v_id")
	private Long brandVId;

	/**
	 * 品牌型号系列id
	 */
	@TableField(value = "brand_v_sku_id")
	private Long brandVSkuId;

	/**
	 * 1:表示信息齐全
	 * 0:表示电梯信息不齐全
	 */
	@TableField(value = "is_complete")
	private Boolean isComplete;

	@ApiModelProperty("楼栋id")
	private Long floorElevatorId;

	@ApiModelProperty("维保-服务电话")
	private String wbPhone;

	@ApiModelProperty("保险-标致url")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<PartWordUrlVo> bxExtUrl;

	@ApiModelProperty("保险-标致url")
	private Date bxExtUrlDate = new Date();

	@ApiModelProperty("保险公司名称")
	private  Long bxCompanyId;

	@ApiModelProperty("保险公司到期时间")
	private  Date bxCompanyEndDate;

	@ApiModelProperty("维保-服务电话贴纸")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<PartWordUrlVo> wbPhoneImg;

	@ApiModelProperty("维保-更新时间")
	private Date wbPhoneImgDate;

	@ApiModelProperty("维保-标致附件url")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<PartWordUrlVo> wbExtUrl;

	@ApiModelProperty("维保-标致附件url更新时间")
	private Date wbExtUrlDate;

	@ApiModelProperty("层信息")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<ElevatorFloorVo> floorTier;

	@ApiModelProperty("站信息")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<ElevatorFloorVo> floorPlatforms;

	@ApiModelProperty("门信息")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<ElevatorFloorVo> floorDoors;

	@ApiModelProperty("安装单位")
	private String azUnitName;

	@ApiModelProperty("安装监督检验日期")
	private String azCheckDate;

	@ApiModelProperty("安装单位启用日期")
	private Date azCheckBeginDate;

	@ApiModelProperty("改装单位名称")
	private String gzUnitName;

	@ApiModelProperty("改造监督检验日期")
	private String gzCheckDate;

	@ApiModelProperty("改装单位名称")
	private String dxUnitName;

	@ApiModelProperty("改造监督检验日期")
	private String dxCheckDate;

	@ApiModelProperty("类型位置完整度")
	private BigDecimal lwIntact;

	@ApiModelProperty("结构完整度")
	private BigDecimal jgIntact;

	@ApiModelProperty("维保完整度")
	private BigDecimal wbIntact;

	@ApiModelProperty("保险完整度")
	private BigDecimal bxIntact;

	@ApiModelProperty("设备技术完整度")
	private BigDecimal sbJsIntact;

	@ApiModelProperty("设备注册完整度")
	private BigDecimal sbZcIntact;

	@ApiModelProperty("出厂完整度")
	private BigDecimal ccIntact;

	@ApiModelProperty("使用完整度")
	private BigDecimal syIntact;

	@ApiModelProperty("安装完整度")
	private BigDecimal azIntact;

	@ApiModelProperty("梯无忧完整度")
	private BigDecimal twyIntact;


}
